home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
unix
/
ch31
/
donutpro.wrl
< prev
next >
Wrap
Text File
|
1996-09-23
|
1KB
|
36 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright [1997] By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
PROTO Donut [
field SFFloat crossSectionRadius 1.0
field SFFloat spineRadius 2.0
field SFInt32 crossSectionResolution 16
field SFInt32 spineResolution 16
eventIn SFFloat set_crossSectionRadius
eventIn SFFloat set_spineRadius
eventOut MFVec2f crossSection_changed
eventOut MFVec3f spine_changed
] {
DEF Ext Extrusion {
spine [ ]
crossSection [ ]
creaseAngle 1.57
beginCap FALSE
endCap FALSE
}
DEF DonutMaker Script {
url "donutmkr.js"
field SFFloat crossSectionRadius IS crossSectionRadius
field SFFloat spineRadius IS spineRadius
field SFInt32 crossSectionResolution IS crossSectionResolution
field SFInt32 spineResolution IS spineResolution
eventIn SFFloat set_crossSectionRadius IS set_crossSectionRadius
eventIn SFFloat set_spineRadius IS set_spineRadius
eventOut MFVec2f crossSection_changed IS crossSection_changed
eventOut MFVec3f spine_changed IS spine_changed
}
ROUTE DonutMaker.crossSection_changed TO Ext.set_crossSection
ROUTE DonutMaker.spine_changed TO Ext.set_spine
}